﻿using System;
using System.Collections.Generic;
using Wx.Standard.Model;
using Wx.Standard.Model.Receive;
using Wx.Standard.Model.Send;

namespace Wx.Standard.IService
{

    public interface IGetMessage
    {
        /// <summary>
        /// 所有消息
        /// </summary>
        /// <param name="actionMsg"></param>
        string AllMsg(Func<ReceiveMsg,string> actionMsg);
        #region 接收普通消息
        /// <summary>
        /// 接收文本消息
        /// </summary>
        /// <returns></returns>
        string TextMsg(Func<ReceiveMsgWithText, string> actionMsg);
        /// <summary>
        /// 接收图片消息
        /// </summary>
        /// <returns></returns>
        string ImageMsg(Func<ReceiveMsgWithImage, string> actionMsg);
        /// <summary>
        /// 接收位置消息
        /// </summary>
        /// <returns></returns>
        string LocationMsg(Func<ReceiveMsgWithLocation, string> actionMsg);
        /// <summary>
        /// 接收链接消息
        /// </summary>
        /// <returns></returns>
        string UrlMsg(Func<ReceiveMsgWithUrl, string> actionMsg);
        /// <summary>
        /// 接收语音消息
        /// </summary>
        /// <returns></returns>
        string VoiceMsg(Func<ReceiveMsgWithVoice, string> actionMsg);
        /// <summary>
        /// 接收视频消息,包含小视频
        /// </summary>
        /// <returns></returns>
        string VideoMsg(Func<ReceiveMsgWithVideo, string> actionMsg);
        #endregion

        #region 接收事件消息
        /// <summary>
        /// 点击菜单事件
        /// </summary>
        /// <param name="key">事件KEY值</param>
        /// <returns></returns>
        string ClickMenuMsg(Func<ReceiveEventWithClickMenu, string> actionMsg);
        /// <summary>
        /// 点击菜单上的链接事件
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        string ViewMenuMsg(Func<ReceiveEventWithClickMenu, string> actionMsg);
        /// <summary>
        /// 上报地理位置事件
        /// </summary>
        /// <returns></returns>
        string UploadLocationMsg(Func<ReceiveEventWithLocation, string> actionMsg);
        /// <summary>
        /// 扫描带参数的二维码事件
        /// </summary>
        /// <param name="str">模糊匹配参数</param>
        /// <returns></returns>
        string ScanningQRcodeMsg(Func<ReceiveEventWithQRcode, string> actionMsg);
        /// <summary>
        /// 关注事件
        /// </summary>
        /// <returns></returns>
        string SubscribeMsg(Func<ReceiveEventBase, string> actionMsg);
        /// <summary>
        /// 取消关注事件
        /// </summary>
        /// <returns></returns>
        string UnSubscribeMsg(Func<ReceiveEventBase, string> actionMsg);
        /// <summary>
        /// 模板消息通知
        /// </summary>
        /// <param name="actionMsg"></param>
        string ModelMsgNotify(Func<ReceiveEventWithModelMsg, string> actionMsg);
        #endregion
        #region 被动回复消息
        /// <summary>
        /// 回复图文消息
        /// </summary>
        /// <param name="ToUser"></param>
        /// <param name="list"></param>
        /// <returns></returns>
        string ReplyNewsMsg(IList<ResponseItem> list);
        /// <summary>
        /// 回复文本消息
        /// </summary>
        /// <param name="touser"></param>
        /// <param name="content"></param>
        /// <returns></returns>
        string ReplyTextMsg(string content);
        #endregion
        /// <summary>
        /// 获取用户
        /// </summary>
        /// <returns></returns>
        WeChatUser GetUser();
    }
}
